<script>
import { defineComponent, getCurrentInstance } from "vue";

export default defineComponent({
  props: {
    that: Object,
  },
  setup(props) {
    return { that: props.that };
  },
  render() {
    let that = this.that;
    return (
      <div class="styleValue">
        <span>高度</span>
        <a-input-number
          value={this.$store.state.aimAttrs.height}
          min={0}
          formatter={(value) => `${value}px`}
          parser={(value) => value.replace("p", "").replace("x", "")}
          style={{ width: "180px" }}
          onChange={(e) => {
            if (e == null || e == "") return;
            this.$store.commit("aimAttrsChange", {
              newValue: e,
              attrsName: "height",
              that,
            });
          }}
        ></a-input-number>
      </div>
    );
  },
});
</script>
